package com.zy.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zy.mapper.PositMapper;
import com.zy.pojo.Posit;
import com.zy.service.PositService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("roleService")
public class PositServiceImpl extends ServiceImpl<PositMapper, Posit> implements PositService {
    @Resource
    private PositMapper roleMapper;
    @Override
    public void add(Posit role) {
        roleMapper.insert(role);
    }

    @Override
    public void update(Posit role) {
        roleMapper.updateById(role);
    }

    @Override
    public void del(Integer id) {
        roleMapper.deleteById(id);
    }

    @Override
    public List<Posit> getRoleList() {
       return roleMapper.selectList(null);
    }



    @Override
    public void err(Integer id) {
        roleMapper.selectById(id);
    }
}
